package com.example.mybatisdemo.util;


/**
 * @author liuyj
 * @mail liuyingj@new-di.com
 * @datetime 2018-06-22 18:32
 **/
public class IdUtils {
    public static IdWorker  idWorker = new IdWorker(1,1);

    private IdUtils(){}

    public static IdWorker getInstance(){
        return idWorker;
    }

    public static long getSnowflakeId() {
        return getInstance().nextId();
    }
}
